<div class="panel-body">
    {{ form("", "method": "post") }}
    <div class="col-md-12">
    {% for element in form %}
        <div class="form-group">
            {{ element.label() }}
            {{ element.render() }}
        </div>
    {% endfor %}
    </div>
    <div class="col-md-12">
        <button type="submit">提交</button>
    </div>
    {{ endForm() }}
</div>
<script>
    {% if form.hasMessage() %}
    alert('{{ form.getFirstMessage() }}');
    {% endif %}
</script>


